package com.xzw.test.springcloud.api.feign;

import com.xzw.test.springcloud.model.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient( contextId = "paymentServiceFeign",value = "cloud-payment-service")//引用test-springcloud-provider-payment 项目命名的提供者
public interface PaymentServiceFeign {

    @RequestMapping(value = "/payment/get",method = RequestMethod.GET, produces = "application/json")
    CommonResult getPaymentById(@RequestParam("id") Long id);


   /* @GetMapping(value = "/payment/get/{id}", produces = "application/json")
    CommonResult getPaymentByIds(@RequestParam("id") Long id);*/
}
